package o;

import androidx.annotation.Nullable;
import java.util.Collections;
import java.util.concurrent.atomic.AtomicReference;

public class yz {
    private static final ts<?, ?, ?> ˎ = new ts(Object.class, Object.class, Object.class, Collections.singletonList(new ti(Object.class, Object.class, Object.class, Collections.emptyList(), new yj(), null)), null);
    private final ds<aav, ts<?, ?, ?>> ˏ = new ds();
    private final AtomicReference<aav> ॱ = new AtomicReference();

    public boolean ˏ(@Nullable ts<?, ?, ?> tsVar) {
        return ˎ.equals(tsVar);
    }

    @Nullable
    public <Data, TResource, Transcode> ts<Data, TResource, Transcode> ˊ(Class<Data> cls, Class<TResource> cls2, Class<Transcode> cls3) {
        ts<Data, TResource, Transcode> tsVar;
        aav ˋ = ˋ(cls, cls2, cls3);
        synchronized (this.ˏ) {
            tsVar = (ts) this.ˏ.get(ˋ);
        }
        this.ॱ.set(ˋ);
        return tsVar;
    }

    public void ॱ(Class<?> cls, Class<?> cls2, Class<?> cls3, @Nullable ts<?, ?, ?> tsVar) {
        synchronized (this.ˏ) {
            ds dsVar = this.ˏ;
            aav o_aav = new aav(cls, cls2, cls3);
            if (tsVar == null) {
                tsVar = ˎ;
            }
            dsVar.put(o_aav, tsVar);
        }
    }

    private aav ˋ(Class<?> cls, Class<?> cls2, Class<?> cls3) {
        aav o_aav = (aav) this.ॱ.getAndSet(null);
        if (o_aav == null) {
            o_aav = new aav();
        }
        o_aav.ˎ(cls, cls2, cls3);
        return o_aav;
    }
}
